#include <stdio.h>

int main()
{
	int n = 0;
	scanf("%d", &n);
	int arr[100000] = { 0 };
	int a = 0;
	int i = n;
	while (i--)
	{
		scanf("%d", &a);
		arr[a] = a;
	}
	for (int i = 0; i<n; i++)
	{
		if (arr[i] != 0)
			printf("%d ", arr[i]);
	}
	return 0;
}


#include <stdio.h>

int main() {
	int n = 0;
	while (~scanf("%d", &n))
	{
		int i = 0;
		int j = 0;
		for (i = 0; i<n; i++)
		{
			for (j = 0; j<n - 1 - i; j++)
			{
				printf("  ");
			}
			for (j = 0; j <= i - 1; j++)
			{
				printf("* ");
			}
			printf("*\n");
		}
	}
	return 0;
}